<?php
declare(strict_types=1);

namespace Plugin\Alarm\Http\Request\Admin;

use Mine\MineFormRequest;

class RdAlarmDangerRequest extends MineFormRequest
{
    /**
     * 公共规则
     */
    public function rules(): array
    {
        return [
            'type' => 'integer',
            'stand_id' => 'integer',
            'camera_id' => 'integer',
            'addr' => 'string|max:255',
            'from_type' => 'integer',
            'severity' => 'integer',
            'extra' => 'array',
            'status' => 'integer',
            'work_id' => 'integer',
        ];
    }

    /**
     * 字段映射名称
     * return array
     */
    public function attributes(): array
    {
        return [
            'id' => 'id',
            'type' => '隐患类型',
            'stand_id' => '站点ID',
            'camera_id' => '摄像头ID',
            'addr' => '发现位置',
            'from_type' => '来源类型',
            'severity' => '隐患严重程度',
            'extra' => '附加信息',
            'status' => '状态',
            'work_id' => '工单ID',
        ];
    }
}